<?php
$type_arr = array(1=>"彩页",2=>"画册",3=>"手袋",4=>"名片");
$status_arr = array(1=>"新订单",2=>"处理中",3=>"已完成");
?>
<table  class="search_table" width="100%">
	<tr>
		<td class="search">
			<form action="{:U($module_name.'/index')}" method="get">
			<input type="hidden" name="g" value="{$Think.GROUP_NAME}" />
			<input type="hidden" name="m" value="{$Think.MODULE_NAME}" />
			<input type="hidden" name="a" value="{$Think.ACTION_NAME}" />
			<input id="title" type="text" size="14" class="input-text" name="keyword" value="{$Think.get.keyword}" />
			<select name="select_type">
				<option value="order_id" <if condition="$select_type =='order_id'">selected="selected"</if>>订单号</option>
				<option value="user_id" <if condition="$select_type =='user_id'">selected="selected"</if>>会员ID</option>
			</select>
            <select name="cat_id">
            <option value="0">全部分类</option>
            <?php foreach($type_arr as $k=>$v){ ?>
				<option value="{$k}" <if condition="$cat_id == $k">selected="selected"</if>>{$v}</option>
			<?php  } ?>
			</select>
			
			<select name="listRows">
				<option value="15" <if condition="$listRows ==5">selected="selected"</if>>15{:L('listRows')}</option>
				<option value="20" <if condition="$listRows ==20">selected="selected"</if>>20{:L('listRows')}</option>
				<option value="50" <if condition="$listRows ==50">selected="selected"</if>>50{:L('listRows')}</option>
				<option value="100" <if condition="$listRows ==100">selected="selected"</if>>100{:L('listRows')}</option>
			</select>

			<input type="hidden" id="menuid" name="menuid" value="{$_GET['menuid']}"/>
			<input type="submit" value="{:L('chaxun')}"  class="button" />
			<input type="reset" value="{:L('reset')}" class="button"  />
			</form>
		</td>

	</tr>
</table>

<form name="myform" id="myform" action="" method="post">

<div class="table-list">
    <table width="100%" cellspacing="0">
		<thead>
            <tr>
			<th width="30"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
            <th width="40">ID</th>
			<th>订单编号</th>
            <th>类别</th>
             <th>数量</th>
            <th>收货人</th>
            <th>电话</th>
            <th>付款状态</th>
			<th width="60">{:L('status')}</th>             
			<th width="72">{:L('manage')}</th>
            </tr>
        </thead>
      	<tbody>
      		<volist name="list" id="vo" key="k">
      		<tr>
			<td  width="30" align="center"><input class="inputcheckbox " name="ids[]" value="{$vo['id']}" type="checkbox" ></td>
			<td align="center">{$vo['id']}</td>
            
      		<td align="center">
            {$vo['order_id']}
            </td>
            <td align="center">{$type_arr[$vo['cat_id']]}</td>
            <td align="center">{$vo['number']}</td>
            <td align="center">{$vo['to_user']}</td>
            <td align="center">{$vo['to_phone']}</td>
            <td align="center"><?php echo $vo['pay_status']?$vo['pay_status']:"未付款"; ?></td>
			<td align="center">
            {$status_arr[$vo['status']]}
            </td>
			<td align="center"><a href="{:U($module_name.'/edit',array(id=>$vo['id']))}">{:L('edit')}</a> | <a href="javascript:confirm_delete('{:U($module_name.'/delete',array(id=>$vo['id']))}')">{:L('delete')}</a></td>
      		</tr>
      		</volist>
      	</tbody>
    </table>

    <div class="btn"><input type="button" class="button" name="dosubmit" value="<?php echo L('delete')?>" onclick="myform.action='{:U($module_name.'/deleteall')}';return confirm_deleteall()"/>  </div>

</form></div>

<div id="pages" class="page">{$page}</div>
<script>
$("#catid").attr("value",'{$catid}');
function confirm_deleteall(){
	art.dialog.confirm("{:L('real_delete')}", function(){ $('#myform').submit();});
}
</script>